package com.handpay.nocardpay.baselibrary.bill.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.handpay.nocardpay.baselibrary.commbase.model.bean.BaseResponseBean;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by sxshi on 2017/8/16.
 */

public class BillBean extends BaseResponseBean implements Parcelable {
    private String amounts;
    private boolean hasProcessingTrans;
    private String items;
    private String totalPages;
    private List<ListBean> list;

    public List<ListBean> getList() {
        return list;
    }

    public void setList(List<ListBean> list) {
        this.list = list;
    }

    public String getAmounts() {
        return amounts;
    }

    public void setAmounts(String amounts) {
        this.amounts = amounts;
    }

    public boolean isHasProcessingTrans() {
        return hasProcessingTrans;
    }

    public void setHasProcessingTrans(boolean hasProcessingTrans) {
        this.hasProcessingTrans = hasProcessingTrans;
    }

    public String getItems() {
        return items;
    }

    public void setItems(String items) {
        this.items = items;
    }

    public String getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(String totalPages) {
        this.totalPages = totalPages;
    }

    public static class ListBean implements Parcelable {
        /**
         * amount : 1000000
         * appCode : 1
         * cardImageUrl :
         * cardNoIn : 622617******5529
         * cardNoOutFull : 4615DE909FA8B17B9BF966C8366D07096EC38D78C48BA5D9
         * detailUrl :
         * fee : 6500
         * imageUrl :
         * isOpen : 0
         * isRevoke : 0
         * issuerId : 5614306C09E4FA0D6EC38D78C48BA5D9
         * issuerName : 793F1A997A83878D52B621A7294494D4
         * merchantcode : CCFD71560E346FA1F4F9482D06B8188D
         * revokeStatus : 0
         * shopName : E0D16231AA54B0461FB8BA80D2E9893818EDF20861DB54DB6EC38D78C48BA5D9
         * showAppealBtn : 0
         * status : 0
         * total : 1000000
         * tradeType : 1
         * tranMediaType : S
         * transAccount : 622617******5529
         * transSN : 518877826
         * transStatus : 可用余额不足
         * transTime : 20170123112453
         * orderNo : 111308688714
         */

        private double amount;
        private int appCode;
        private String cardImageUrl;
        private String cardNoIn;
        private String cardNoOutFull;
        private String detailUrl;
        private double fee;
        private String imageUrl;
        private int isOpen;
        private int isRevoke;
        private String issuerId;
        private String issuerName;
        private String merchantcode;
        private int revokeStatus;
        private String shopName;
        private int showAppealBtn;
        private int status;
        private double total;
        private int tradeType;
        private String tranMediaType;
        private String transAccount;
        private String transSN;
        private String transStatus;
        private String transTime;
        private String orderNo;

        public double getAmount() {
            return amount;
        }

        public void setAmount(double amount) {
            this.amount = amount;
        }

        public int getAppCode() {
            return appCode;
        }

        public void setAppCode(int appCode) {
            this.appCode = appCode;
        }

        public String getCardImageUrl() {
            return cardImageUrl;
        }

        public void setCardImageUrl(String cardImageUrl) {
            this.cardImageUrl = cardImageUrl;
        }

        public String getCardNoIn() {
            return cardNoIn;
        }

        public void setCardNoIn(String cardNoIn) {
            this.cardNoIn = cardNoIn;
        }

        public String getCardNoOutFull() {
            return cardNoOutFull;
        }

        public void setCardNoOutFull(String cardNoOutFull) {
            this.cardNoOutFull = cardNoOutFull;
        }

        public String getDetailUrl() {
            return detailUrl;
        }

        public void setDetailUrl(String detailUrl) {
            this.detailUrl = detailUrl;
        }

        public double getFee() {
            return fee;
        }

        public void setFee(double fee) {
            this.fee = fee;
        }

        public String getImageUrl() {
            return imageUrl;
        }

        public void setImageUrl(String imageUrl) {
            this.imageUrl = imageUrl;
        }

        public int getIsOpen() {
            return isOpen;
        }

        public void setIsOpen(int isOpen) {
            this.isOpen = isOpen;
        }

        public int getIsRevoke() {
            return isRevoke;
        }

        public void setIsRevoke(int isRevoke) {
            this.isRevoke = isRevoke;
        }

        public String getIssuerId() {
            return issuerId;
        }

        public void setIssuerId(String issuerId) {
            this.issuerId = issuerId;
        }

        public String getIssuerName() {
            return issuerName;
        }

        public void setIssuerName(String issuerName) {
            this.issuerName = issuerName;
        }

        public String getMerchantcode() {
            return merchantcode;
        }

        public void setMerchantcode(String merchantcode) {
            this.merchantcode = merchantcode;
        }

        public int getRevokeStatus() {
            return revokeStatus;
        }

        public void setRevokeStatus(int revokeStatus) {
            this.revokeStatus = revokeStatus;
        }

        public String getShopName() {
            return shopName;
        }

        public void setShopName(String shopName) {
            this.shopName = shopName;
        }

        public int getShowAppealBtn() {
            return showAppealBtn;
        }

        public void setShowAppealBtn(int showAppealBtn) {
            this.showAppealBtn = showAppealBtn;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public double getTotal() {
            return total;
        }

        public void setTotal(double total) {
            this.total = total;
        }

        public int getTradeType() {
            return tradeType;
        }

        public void setTradeType(int tradeType) {
            this.tradeType = tradeType;
        }

        public String getTranMediaType() {
            return tranMediaType;
        }

        public void setTranMediaType(String tranMediaType) {
            this.tranMediaType = tranMediaType;
        }

        public String getTransAccount() {
            return transAccount;
        }

        public void setTransAccount(String transAccount) {
            this.transAccount = transAccount;
        }

        public String getTransSN() {
            return transSN;
        }

        public void setTransSN(String transSN) {
            this.transSN = transSN;
        }

        public String getTransStatus() {
            return transStatus;
        }

        public void setTransStatus(String transStatus) {
            this.transStatus = transStatus;
        }

        public String getTransTime() {
            return transTime;
        }

        public void setTransTime(String transTime) {
            this.transTime = transTime;
        }

        public String getOrderNo() {
            return orderNo;
        }

        public void setOrderNo(String orderNo) {
            this.orderNo = orderNo;
        }


        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeDouble(this.amount);
            dest.writeInt(this.appCode);
            dest.writeString(this.cardImageUrl);
            dest.writeString(this.cardNoIn);
            dest.writeString(this.cardNoOutFull);
            dest.writeString(this.detailUrl);
            dest.writeDouble(this.fee);
            dest.writeString(this.imageUrl);
            dest.writeInt(this.isOpen);
            dest.writeInt(this.isRevoke);
            dest.writeString(this.issuerId);
            dest.writeString(this.issuerName);
            dest.writeString(this.merchantcode);
            dest.writeInt(this.revokeStatus);
            dest.writeString(this.shopName);
            dest.writeInt(this.showAppealBtn);
            dest.writeInt(this.status);
            dest.writeDouble(this.total);
            dest.writeInt(this.tradeType);
            dest.writeString(this.tranMediaType);
            dest.writeString(this.transAccount);
            dest.writeString(this.transSN);
            dest.writeString(this.transStatus);
            dest.writeString(this.transTime);
            dest.writeString(this.orderNo);
        }

        public ListBean() {
        }

        protected ListBean(Parcel in) {
            this.amount = in.readDouble();
            this.appCode = in.readInt();
            this.cardImageUrl = in.readString();
            this.cardNoIn = in.readString();
            this.cardNoOutFull = in.readString();
            this.detailUrl = in.readString();
            this.fee = in.readDouble();
            this.imageUrl = in.readString();
            this.isOpen = in.readInt();
            this.isRevoke = in.readInt();
            this.issuerId = in.readString();
            this.issuerName = in.readString();
            this.merchantcode = in.readString();
            this.revokeStatus = in.readInt();
            this.shopName = in.readString();
            this.showAppealBtn = in.readInt();
            this.status = in.readInt();
            this.total = in.readDouble();
            this.tradeType = in.readInt();
            this.tranMediaType = in.readString();
            this.transAccount = in.readString();
            this.transSN = in.readString();
            this.transStatus = in.readString();
            this.transTime = in.readString();
            this.orderNo = in.readString();
        }

        public static final Creator<ListBean> CREATOR = new Creator<ListBean>() {
            @Override
            public ListBean createFromParcel(Parcel source) {
                return new ListBean(source);
            }

            @Override
            public ListBean[] newArray(int size) {
                return new ListBean[size];
            }
        };

        @Override
        public String toString() {
            return "ListBean{" +
                    "amount=" + amount +
                    ", appCode=" + appCode +
                    ", cardImageUrl='" + cardImageUrl + '\'' +
                    ", cardNoIn='" + cardNoIn + '\'' +
                    ", cardNoOutFull='" + cardNoOutFull + '\'' +
                    ", detailUrl='" + detailUrl + '\'' +
                    ", fee=" + fee +
                    ", imageUrl='" + imageUrl + '\'' +
                    ", isOpen=" + isOpen +
                    ", isRevoke=" + isRevoke +
                    ", issuerId='" + issuerId + '\'' +
                    ", issuerName='" + issuerName + '\'' +
                    ", merchantcode='" + merchantcode + '\'' +
                    ", revokeStatus=" + revokeStatus +
                    ", shopName='" + shopName + '\'' +
                    ", showAppealBtn=" + showAppealBtn +
                    ", status='" + status + '\'' +
                    ", total=" + total +
                    ", tradeType=" + tradeType +
                    ", tranMediaType='" + tranMediaType + '\'' +
                    ", transAccount='" + transAccount + '\'' +
                    ", transSN='" + transSN + '\'' +
                    ", transStatus='" + transStatus + '\'' +
                    ", transTime='" + transTime + '\'' +
                    ", orderNo='" + orderNo + '\'' +
                    '}';
        }
    }

    public BillBean() {
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.amounts);
        dest.writeByte(this.hasProcessingTrans ? (byte) 1 : (byte) 0);
        dest.writeString(this.items);
        dest.writeString(this.totalPages);
        dest.writeTypedList(this.list);
    }

    protected BillBean(Parcel in) {
        this.amounts = in.readString();
        this.hasProcessingTrans = in.readByte() != 0;
        this.items = in.readString();
        this.totalPages = in.readString();
        this.list = in.createTypedArrayList(ListBean.CREATOR);
    }

    public static final Creator<BillBean> CREATOR = new Creator<BillBean>() {
        @Override
        public BillBean createFromParcel(Parcel source) {
            return new BillBean(source);
        }

        @Override
        public BillBean[] newArray(int size) {
            return new BillBean[size];
        }
    };

    @Override
    public String toString() {
        return "BillBean{" +
                "amounts='" + amounts + '\'' +
                ", hasProcessingTrans=" + hasProcessingTrans +
                ", items='" + items + '\'' +
                ", totalPages='" + totalPages + '\'' +
                ", list=" + list +
                '}';
    }
}
